Skip to content

Fix unnecessary rendering of tag filter component - #444

Open
DevVivekk wants to merge 1 commit into
apsinghdev:mainfrom
DevVivekk:fix/re-rendering-tag-component
Open

Fix unnecessary rendering of tag filter component#444
DevVivekk wants to merge 1 commit into
apsinghdev:mainfrom
DevVivekk:fix/re-rendering-tag-component

Conversation

@DevVivekk

@DevVivekk DevVivekk commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #443

Summary by CodeRabbit

  • Performance
    • Improved the tag filter’s rendering efficiency by preventing unnecessary re-renders when its inputs have not changed.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@DevVivekk is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c20407e-0029-4333-9734-b3162a23e0a3

📥 Commits

Reviewing files that changed from the base of the PR and between a0c8d78 and 7e3dbf8.

📒 Files selected for processing (1)
  • apps/web/src/components/oss-programs/TagFilter.tsx

📝 Walkthrough

Walkthrough

TagFilter is refactored into a locally defined component and exported through React.memo, preventing renders when its props remain unchanged.

Changes

TagFilter memoization

Layer / File(s) Summary
Memoize TagFilter
apps/web/src/components/oss-programs/TagFilter.tsx
The component is defined locally, imports memo, and is exported as memo(TagFilter).

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reducing unnecessary Tag Filter re-renders.
Linked Issues check ✅ Passed The memoization change addresses issue #443 by preventing Tag Filter re-renders from Search Filter changes.
Out of Scope Changes check ✅ Passed The PR only refactors TagFilter for memoization and does not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/src/components/oss-programs/TagFilter.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from: /apps/web/.eslintrc.json
at JSON.stringify ()
at /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2156:45
at Array.map ()
at ConfigValidator.formatErrors (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2147:23)
at ConfigValidator.validateConfigSchema (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2177:84)
at ConfigArrayFactory._normalizeConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3019:19)
at ConfigArrayFactory._loadConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2984:21)
at ConfigArrayFactory._loadExtendedShareableConfig (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3285:21)
at ConfigArrayFactory._loadExtends (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3156:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3095:25)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DevVivekk

Copy link
Copy Markdown
Contributor Author

Hey @apsinghdev, did you had a chance to review this PR? Lmk if any changes required. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Unnecessary Re-renders of Tag Filter Component

1 participant